package com.hitqz.robot.dispatch.netty.strategy.zhiqingDispather;

import lombok.Data;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.Point;
@Data
public class Position {
    private Double x;
    private Double y;

    public Position(Double x, Double y) {
        this.x = x;
        this.y = y;
    }

    // 将Position转换为JTS Point
    public Point toPoint() {
        GeometryFactory factory = new GeometryFactory();
        return factory.createPoint(new Coordinate(x, y));
    }
}